Skip to content

feat(core): run tasks from resource events - #1176

Open
dcramer wants to merge 2 commits into
codex/resource-event-catalogfrom
codex/core-event-tasks
Open

feat(core): run tasks from resource events#1176
dcramer wants to merge 2 commits into
codex/resource-event-catalogfrom
codex/core-event-tasks

Conversation

@dcramer

@dcramer dcramer commented Jul 31, 2026

Copy link
Copy Markdown
Member

Built on #1184, Junior can now persist event tasks that execute a durable instruction whenever an enabled plugin publishes a matching resource event. Tasks are scoped to the current Slack channel or DM, can select multiple event types, and allow multiple tasks for the same resource selector. The management tools follow scheduler-style destination permissions and intentionally omit pause and resume operations.

Tasks use the creator's connected credentials by default when the stored work needs user-bound access. Other members of a public destination can manage the task, but they cannot enable or retarget the creator's delegated credentials. Matching events dispatch through the existing durable agent-delivery path, using the task and provider event key for idempotency so webhook replays do not execute a task twice.

The SQL migration, task store, authorization, tools, dispatch path, and event-task evals are contained here. Temporary resource watches, plugin event registration, runtime discovery, and GitHub/Vercel event normalization are reviewed separately in #1184. A code TODO records the remaining circuit-breaker work for runaway event-driven execution rather than imposing an arbitrary execution quota in this change.

Refs #1174

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 2, 2026 5:35am

Request Review

Comment thread packages/junior/src/chat/event-tasks/store.ts Outdated
Comment thread packages/junior/src/chat/tools/event-tasks.ts Outdated
Comment thread packages/junior/src/chat/event-tasks/ingest.ts
Comment thread packages/junior/src/chat/tools/event-tasks.ts Outdated
Comment thread packages/junior/migrations/0014_normal_kat_farrell.sql Outdated
Comment thread packages/junior/src/chat/tools/event-tasks.ts Outdated
Comment thread packages/junior/src/chat/event-tasks/ingest.ts Outdated
Comment thread packages/junior/src/chat/tools/event-tasks.ts Outdated
Comment thread packages/junior/src/chat/tools/event-tasks.ts Outdated
Comment thread packages/junior/src/chat/event-tasks/ingest.ts
Comment thread packages/junior/src/chat/event-tasks/ingest.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 98f80a3. Configure here.

Comment thread packages/junior/src/chat/tools/event-tasks.ts Outdated
@dcramer
dcramer force-pushed the codex/resource-event-catalog branch from 568f4c8 to 0d11df2 Compare August 2, 2026 02:51
@dcramer
dcramer force-pushed the codex/core-event-tasks branch from 98f80a3 to 85e1a1b Compare August 2, 2026 02:51
@dcramer
dcramer force-pushed the codex/resource-event-catalog branch from 0d11df2 to c423920 Compare August 2, 2026 03:31
@dcramer
dcramer force-pushed the codex/core-event-tasks branch from 85e1a1b to f867633 Compare August 2, 2026 03:32
@dcramer
dcramer force-pushed the codex/resource-event-catalog branch from c423920 to a23f94b Compare August 2, 2026 04:26
@dcramer
dcramer force-pushed the codex/core-event-tasks branch from f867633 to 005cf8e Compare August 2, 2026 04:28
@dcramer
dcramer force-pushed the codex/resource-event-catalog branch from a23f94b to db2d33c Compare August 2, 2026 04:31
@dcramer
dcramer force-pushed the codex/core-event-tasks branch from 005cf8e to 167edf3 Compare August 2, 2026 04:32
@dcramer
dcramer force-pushed the codex/resource-event-catalog branch from db2d33c to 7aee0d0 Compare August 2, 2026 05:06
@dcramer
dcramer force-pushed the codex/core-event-tasks branch from 167edf3 to d839b87 Compare August 2, 2026 05:06
@dcramer
dcramer changed the base branch from codex/resource-event-catalog to main August 2, 2026 05:34
@dcramer
dcramer force-pushed the codex/core-event-tasks branch from d839b87 to c1c466d Compare August 2, 2026 05:34
@dcramer
dcramer changed the base branch from main to codex/resource-event-catalog August 2, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant